using Business.WarehouseReserveManagement;
using Business.WarehouseReserveManagement.Dto;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;

namespace Business.Controllers
{
    [RemoteService]
    [Area("Business")]
    [Route("api/app/WarehouseReserve")]
    public class WarehouseReserveController : AbpController
    {
        private readonly IWarehouseReserveAppService _WarehouseReserveAppService;

        public WarehouseReserveController(IWarehouseReserveAppService WarehouseReserveAppService)
        {
            _WarehouseReserveAppService = WarehouseReserveAppService;
        }

        [HttpPost]
        [Route("data-post")]
        public Task<WarehouseReserveDto> DataPost(CreateOrUpdateWarehouseReserveDto input)
        {
            return _WarehouseReserveAppService.DataPost(input);
        }

        [HttpPost]
        [Route("delete")]
        public Task Delete(List<Guid> ids)
        {
            return _WarehouseReserveAppService.Delete(ids);
        }

        [HttpGet]
        [Route("{id}")]
        public Task<WarehouseReserveDto> Get(Guid id)
        {
            return _WarehouseReserveAppService.Get(id);
        }

        [HttpGet]
        public Task<PagedResultDto<WarehouseReserveDto>> GetAll(GetWarehouseReserveInputDto input)
        {
            return _WarehouseReserveAppService.GetAll(input);
        }
    }
}
